In conventional graphics processing systems, an object to be displayed is typically represented as a set of one or more graphics primitives. Examples of graphics primitives include one-dimensional graphics primitives, such as lines, and two-dimensional graphics primitives, such as polygons. Typically, a graphics primitive is defined by a set of vertices each having a number of attributes. For example, a graphics primitive can be a triangle that is defined by three vertices, and each of the vertices can have up to 128 attributes, such as spatial coordinates, color components, fog components, specularity components, and texture coordinates.
Conventional graphics processing systems sometimes implement techniques for clipping graphics primitives. Clipping typically refers to a set of operations that determine which portions of an object are to be displayed with respect to a set of clipping planes. Various techniques have been developed for clipping graphics primitives. Examples of these techniques include the Cohen-Sutherland technique, the Liang-Barsky technique, the Sutherland-Hodgeman technique, and the Weiler technique. Clipping a polygon with respect to a set of clipping planes can produce a number of new vertices, some of which are eventually clipped away and discarded. For example, clipping a triangle with respect to six clipping planes can produce up to 9 new vertices, while clipping the same triangle with respect to 14 clipping planes can produce up to 17 new vertices.
Conventional clipping techniques can be computationally intensive, particularly when clipping polygons with respect to multiple clipping planes. In the case of the Sutherland-Hodgeman technique, clipping with respect to each clipping plane can involve a number of interpolation operations to derive attributes of a new vertex that is produced. Indeed, one significant drawback of the Sutherland-Hodgeman technique is that this technique typically derives all attributes of each new vertex that is produced, even if that new vertex is eventually clipped away and discarded. For example, if each vertex has 128 attributes, derivation of all attributes can involve 128 separate interpolation operations for each new vertex that is produced. As a result of this drawback, the Sutherland-Hodgeman technique can lead to inefficiencies in terms of performing unnecessary interpolation operations, which can translate into a processing time that is longer than desired. In addition, such inefficiencies can translate into an enhanced buffering size requirement to accommodate all attributes of each new vertex that is produced. For example, if each new vertex has 128 attributes each being a 32 bit word, the buffering size requirement can be (17×128×32) when clipping with respect to 14 clipping planes.
It is against this background that a need arose to develop the apparatus, system, and method described herein.